package com.yf.exam.modules.trainingarchives.evaluation.service.impl;

import com.yf.exam.modules.trainingarchives.evaluation.dto.EvaluationExplainDTO;
import com.yf.exam.modules.trainingarchives.evaluation.entity.EvaluationExplain;
import com.yf.exam.modules.trainingarchives.evaluation.mapper.EvaluationExplainMapper;
import com.yf.exam.modules.trainingarchives.evaluation.service.IEvaluationExplainService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yf.exam.modules.user.UserUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 满意度调查说明模板表 服务实现类
 * </p>
 *
 * @author lql
 * @since 2025-01-06
 */
@Service
public class EvaluationExplainServiceImpl extends ServiceImpl<EvaluationExplainMapper, EvaluationExplain> implements IEvaluationExplainService {

    @Override
    public void add(EvaluationExplainDTO reqDTO) {
        EvaluationExplain entity = new EvaluationExplain();
        reqDTO.setOrganizationId(UserUtils.getDepartId());
        BeanUtils.copyProperties(reqDTO,entity);
        this.save(entity);
    }
}
